<template>
	<div class="bg-act-box">
		<el-dialog
		  title="编辑内容"
		  :visible.sync="dialogVisible"
		  width="30%"
		  :before-close="handleClose">
		  <div class="b-j-box">
				<span class="m-s-txt-lb">页面风格:</span>
				<el-radio v-model="radio" label="1">默认</el-radio>
				<el-radio v-model="radio" label="2">自定义</el-radio>
		  </div>
		  <div class="block" v-if="radio == '2'">
		  	 <el-input
		  			type="textarea"
		  			:autosize="{ minRows: 4, maxRows: 10 }"
		  			placeholder="请输入"
		  			v-model="context.txt">
		  	</el-input>
		  </div>
		</el-dialog>
	</div>
</template>

<script>
	import addPhoto from "@/components/comm/AddPhoto.vue";
	import uploadPic from "@/js/upload/UploadPic.js";
	import staticConst from "@/js/const/StaticConst.js";
	export default
	{
		data()
		{
			return{
				dialogVisible:false,
				radio: '1',
				context:{},
				act:"",
				index:"",
			}
		},
		
		methods:
		{
			showWin(data)
			{
				this.dialogVisible = true;
				this.act = data.act;
				this.index = data.index;
				this.context = data.data;
			},
			
			handleClose()
			{
				this.dialogVisible = false;
				let data = {};
				data.act = this.act;
				data.index = this.index;
				data.data = this.context;
				this.$emit('editContext',data);
			},
		}
	}
</script>

<style lang="scss" scoped>
	
	.bg-act-box
	{
		::v-deep.el-dialog
		{
			margin-top: 40vh !important;
		}
		
		.b-j-box
		{
			height: 36px;
			display: flex;
			align-items: center;
		}
	}
	
	.m-s-txt-lb
	{
		padding-right: 10px;
	}
	.o-u-box
	{
		padding-left: 90px;
		display:flex;
		align-items: center;
		padding-top: 20px;
		.u-btn
		{
			margin-left: 10px;
			padding: 4px 20px;
			background-color: #3388FF;
			color:#FFF;
			border-radius: 4px;
			cursor: pointer;
		}
	}
	
</style>